package Function;

public class Dog extends Pet {
    public Dog(String name) {
        super();
        this.name = name;
    }
    public void eat(Food food) {
        System.out.println(name+"好饿好饿");
        System.out.println("正在喂"+name+"吃"+food.getFood());
        if (food.getFood().matches(Food.Bone)) {
            System.out.println(name+"正在吃"+food.getFood()+"！");
        }else {
            System.out.println("可是"+name+"不喜欢吃"+food.getFood()+"!");
        }
    }

}